package net.mihome.app.bean;

import java.util.Map;

import android.R.integer;

public class Advert  extends Entity{
	private int id;
	private int shop_id;
	private String content;
	private String desc;
	private String img;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getShop_id() {
		return shop_id;
	}
	public void setShop_id(int shop_id) {
		this.shop_id = shop_id;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public String getImg() {
		return img;
	}
	public void setImg(String img) {
		this.img = img;
	}
	public static Advert parse(Map map){
		Advert advert=new Advert();
		Double idDouble=(Double) map.get("id");
		advert.setId(idDouble.intValue());
		advert.setContent((String) map.get("content"));
		advert.setDesc((String) map.get("desc"));
		advert.setImg((String) map.get("img"));
		Double shopidDouble=(Double) map.get("shop_id");
		advert.setShop_id(shopidDouble.intValue());
		return advert;
	}
	
}
